/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.service;


import com.msk.sys.service.BaseService;
import com.msk.sys.service.CrudService;
import com.msk.wlhy.domain.HtCompanyCustomer;
import com.msk.wlhy.mapper.HtCompanyCustomerDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 企业客户信息维护Service
 * @author zkp
 * @version 2018-06-06
 */
@Service
@Transactional(readOnly = true)
public class HtCompanyCustomerService extends CrudService<HtCompanyCustomerDao, HtCompanyCustomer> {
	@Autowired
	private HtCompanyCustomerDao htCompanyCustomerDao;

	public HtCompanyCustomer get(String id) {
		return super.get(id);
	}
	
	public List<HtCompanyCustomer> findList(HtCompanyCustomer htCompanyCustomer) {
		return super.findList(htCompanyCustomer);
	}
	
//	public Page<HtCompanyCustomer> findPage(Page<HtCompanyCustomer> page, HtCompanyCustomer htCompanyCustomer) {
//		htCompanyCustomer.getSqlMap().put("dsf", BaseService.dataScopeFilter(htCompanyCustomer.getCurrentUser(), "o4", "u"));
//		return super.findPage(page, htCompanyCustomer);
//	}
	
	@Transactional(readOnly = false)
	public void save(HtCompanyCustomer htCompanyCustomer) {
		super.save(htCompanyCustomer);
	}
	
	@Transactional(readOnly = false)
	public void delete(HtCompanyCustomer htCompanyCustomer) {
		super.delete(htCompanyCustomer);
	}
	
	@Transactional(readOnly = false)
	public int deleteIds(String[] ids) {
		int result = 0;
		for (String id : ids) {
			super.delete(new HtCompanyCustomer(id));
			result ++;
		}
		return result;
	}
	public HtCompanyCustomer getHtCompanyCustomer(HtCompanyCustomer htCompanyCustomer){
		return htCompanyCustomerDao.getHtCompanyCustomer(htCompanyCustomer);
	}
	
}